Optimal. Leaf size=140 \[ -\frac {(a-b x)^{-n} (a+b x)^{1+n}}{x}+\frac {b (1+2 n) (a-b x)^{-n} (a+b x)^n \, _2F_1\left (1,-n;1-n;\frac {a-b x}{a+b x}\right )}{n}-\frac {2^n b (a-b x)^{-n} (a+b x)^n \left (\frac {a+b x}{a}\right )^{-n} \, _2F_1\left (-n,-n;1-n;\frac {a-b x}{2 a}\right )}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {130, 72, 71, 98,
133} \begin {gather*} \frac {b (2 n+1) (a+b x)^n (a-b x)^{-n} \, _2F_1\left (1,-n;1-n;\frac {a-b x}{a+b x}\right )}{n}-\frac {b 2^n (a+b x)^n \left (\frac {a+b x}{a}\right )^{-n} (a-b x)^{-n} \, _2F_1\left (-n,-n;1-n;\frac {a-b x}{2 a}\right )}{n}-\frac {(a+b x)^{n+1} (a-b x)^{-n}}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 71
Rule 72
Rule 98
Rule 130
Rule 133
Rubi steps
\begin {align*} \int \frac {(a-b x)^{-n} (a+b x)^{1+n}}{x^2} \, dx &=\left (2^{-n} (a-b x)^{-n} \left (\frac {a-b x}{a}\right )^n\right ) \int \frac {(a+b x)^{1+n} \left (\frac {1}{2}-\frac {b x}{2 a}\right )^{-n}}{x^2} \, dx\\ &=\frac {2^{-n} b (a-b x)^{-n} \left (\frac {a-b x}{a}\right )^n (a+b x)^{2+n} F_1\left (2+n;n,2;3+n;\frac {a+b x}{2 a},\frac {a+b x}{a}\right )}{a^2 (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 0.22, size = 146, normalized size = 1.04 \begin {gather*} \frac {(a-b x)^{-n} (a+b x)^n \left (-\frac {a^2 \left (1-\frac {a}{b x}\right )^n \left (1+\frac {a}{b x}\right )^{-n} F_1\left (1;n,-n;2;\frac {a}{b x},-\frac {a}{b x}\right )}{x}+\frac {2^n b (a-b x) \left (1+\frac {b x}{a}\right )^{-n} F_1\left (1-n;-n,1;2-n;\frac {a-b x}{2 a},1-\frac {b x}{a}\right )}{-1+n}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {\left (b x +a \right )^{1+n} \left (-b x +a \right )^{-n}}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a - b x\right )^{- n} \left (a + b x\right )^{n + 1}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,x\right )}^{n+1}}{x^2\,{\left (a-b\,x\right )}^n} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________